home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d14
/
demdat.arc
/
MENU.SBP
< prev
next >
Wrap
Text File
|
1990-06-01
|
14KB
|
620 lines
SBP
╜ MENU
╜ Superbase Demonstration Trading System
╜ Master Menu Program
╜ Last updated May 16, 90
│ _ wferror
mloop: ╜ Menu item selection
▀ e
íret% p
╜ Returning from another routine
í £ banner$ p ┤ £banner$ ^ £
íma%
4 p vsmenu
^
╜ First time thru
í σsys(7)
400 pvga$ "n" ^vga$ "y"
ívga$ "y" pbanner$ "menuf" ^banner$ "menufe"
vsinit
Æ í
¼ │ma%,mb%
╩ ╦ss1$
╪ Oma%
íh2% :( R) p vshead
┘
íma%
4 p ¼ à
ret% 1
│ma% wm1,m2,m3,m4,m5,m6
sinit: ╜ Initialize first time thru
å t: Γ e: ╩ f │: ╦ │: ▓"z-99999.00"
h3$ "Superbase Demonstration Trading System "
╩ ╦"Initializing application"
╩ ┬ ƒ"Trading System"
vshead
┤ £banner$
┤ Ö"TRANS": ┤ Ö"CTRL": ╜ opens all files
╫pstk$(12),pstk%(12): ╜ key arrays for multi-record screens
╜ Dialog messages
ms1$ "Is entry correct?"
ms2$ "Continue with data entry?"
ms3$ "Do you wish to reprint?"
ms4$ "Has all output been correctly printed?"
ms5$ "Select another record?"
ms6$ "Select another line?"
ms7$ "Select index sequence"
ms8$ "Record already exists with this key"
ms9$ "Press OK to make another selection"
ms10$ "Report to printer?"
ms11$ "Report line too long for printer"
ms12$ "Try using a smaller font"
ms13$ "Include external images and text?"
ms14$ "Deleting record "
ms15$ "Are you sure?"
ms16$ "Print (c)urrent record, (s)elected or (a)ll records"
ms17$ "(d)isplay or (p)rint?"
ms18$ "Cannot find related client record"
ms19$ "Transaction record found"
ms20$ "Please delete related transaction(s)"
ms21$ "Break in program"
ms22$ "Do you wish to resume?"
ms23$ "Select query to be loaded"
ms24$ "Enter query name"
ms25$ "Cannot edit or delete"
ms26$ "Batch totals do not agree"
ms27$ "Amount must be positive"
ms28$ "Batch totals agree"
ms29$ "Do you wish to edit batch?"
ms30$ "Do you have a VGA display adapter?"
ms311$ "This produces certificate advices for"
ms312$ "transactions with certificate numbers"
ms321$ "This produces contract notes"
ms322$ "for all new transactions"
ms411$ "This updates stocks with year highs"
ms421$ "This updates stocks with year lows"
ms431$ "This updates transactions to indicate"
ms432$ "that certificates have been sent"
ms442$ "that contract notes have been sent"
╜ Status line messages
ss1$ "Select a pulldown menu option"
ss2$ "Select a pushbutton option"
ss3$ "Enter data for new record"
ss4$ "Use TAB or click on field to be edited. ESC to stop."
ss6$ "Printing"
ss7$ "Press the Space Bar to continue"
ss8$ "Creating temporary mailmerge file"
ss9$ "Enter new value(s)"
ss10$ "Browse in "
ss11$ " sequence: use STOP to end browsing"
ss12$ "Select line to be deleted"
ss13$ "Select pushbutton or click on line to edit"
ss14$ "Press any key or click on mouse button to continue"
ss15$ "Create or edit query. Use ENTER to stop"
ss16$ "Checking whether referenced elsewhere"
ss17$ "Updating client trading balance"
ss18$ "Press ENTER for default values"
ss19$ "Updating"
ss20$ "Enter batch total"
ss21$ "Move the pointer over a transaction line and click"
¼ à
smenu: ╜ Define pulldown menus
╜ Flags in CTRL do graying for doc production/update cycles
¼1,0,1,"&File"
¼1,1,1,"&Clients"
¼1,2,1,"&Stocks"
¼1,3,1,"C&ountries"
¼1,4,1,"C&urrencies"
¼1,5,tran.CTRL,"&Transactions"
¼1,6,1,"&Exit"
¼2,0,1,"&Daily"
¼2,1,1,"&Currency Rates"
¼2,2,1,"&Stock Prices"
¼2,3,cent.CTRL,"Certificate &Nos"
¼2,4,1,"Cash &Receipts"
¼2,5,1,"Cash &Payments"
¼3,0,1,"D&ocuments"
¼3,1,cert.CTRL,"&Certificates":
¼3,2,cont.CTRL,"C&ontract Notes"
¼3,3,1,"&Statements"
¼4,0,1,"&Update"
¼4,1,1,"Stock &Highs"
¼4,2,1,"Stock &Lows"
¼4,3,ceru.CTRL,"&Certs Sent"
¼4,4,conu.CTRL,"&Notes Sent"
¼5,0,1,"&Query"
¼5,1,1,"&Run"
¼5,2,1,"&New"
¼5,3,1,"&Open"
¼5,4,1,"&Edit"
¼5,5,1,"&Save"
¼6,0,1,"&Reports"
¼6,1,1,"&Traded Stocks"
¼6,2,1,"Stock &Highs"
¼6,3,1,"Stock &Lows"
¼6,4,1,"T&rading Balances"
¼6,5,1,"-----------------"
¼6,6,1,"Telephone &Nos"
¼6,7,1,"Client &Balances"
¼6,8,1,"&Cash Audit"
├
shead: ╜ Set heading every minute during menu wait
h1$ ( Q,"mmm dd, yy"):h2$ 7( R,"hh:mm am")
h2% :( R):h3% (50 /(h3$)) 2
h4$ h1$ '(h3%) h3$ '(h3%) h2$
╩ ƒh4$
├
m1: ╜ ma%= 1 File menu options
selkey$ "":selkey% 0
│mb% wstkf,stkf,m13,m13,stkf,m16
m13: ╜ File Countries, Currencies
ä"stkfo"
m16: ╜ File Exit
å t: ╩ ƒ"": ╩ ┬ ƒ"": Γ │: Æ
m2: ╜ ma%=2 Daily menu options
│mb% wm21,m21,m21,m24,m24
m21: ╜ Daily Currency rates, Stock prices, Certificate numbers
ä"stkdc"
m24: ╜ Daily Cash receipts, Cash payments
ä"stkdr"
m3: ╜ ma%=3 Documents menu options
│mb% vm31,m31,stkf
wmloop
m31: ╜ Documents Certificate advices, Contract notes
╔ µmb%
µ1
┬ms311$,ms312$,140,a%
µ2
┬ms321$,ms322$,140,a%
Æ ╔
ía% 0 p ├
▀ e
╩ ╦ss8$
ímb% 1 p
╜ Certificate advices
docf$ "certs":letf$ "lecerts"
í J("certs.sbf") p ┤ Ödocf$: ╛ Ödocf$
╔Customer_Ref.TRANS,Quantity.TRANS,Certificate_No.TRANS,Title.CLIENTS,Firstname.CLIENTS,
Lastname.CLIENTS,Company.CLIENTS,Street.CLIENTS,Address.CLIENTS,
City.CLIENTS,State.CLIENTS,Zip_Code.CLIENTS,Country.CLIENTS,
Company Name.STOCKS,Stock_Type
╨Customer_Ref.TRANS Customer_Ref.CLIENTS Stock_Key.TRANS Stock_Key.STOCKS Trans_Type.TRANS "b" Certificate_No.TRANS "" Cert_Sent_yn.TRANS "n"
╡Stock_Key.TRANS,Certificate_No.TRANS
q Ödocf$
Æ ╔
^ ímb% 2 p
╜ Contract notes
docf$ "invs":letf$ "leinvs"
í J("invs.sbf") p ┤ Ödocf$: ╛ Ödocf$
╔Stock_Key.TRANS,Customer_Ref.TRANS,Transaction ref,Trans_Type,Trans_Desc,Trans_Date,Settlement_Date, (Quantity.TRANS,6,0) U"QTY", (Stock_Price.TRANS,6,2) U"PR",Currency.TRANS,USD Xrate.TRANS,
( (USD Value.TRANS),6,2) U"USDV",(Comm_Value) U"Com", ( (USD Value.TRANS Comm_Value),6,2) U"TV",&24(Client.CLIENTS) U"Client",Company.CLIENTS,Street.CLIENTS,Address.CLIENTS,City.CLIENTS,
State.CLIENTS,Zip_Code.CLIENTS,Country.CLIENTS,Company Name.STOCKS,Stock_Type,Exchange
╨Customer_Ref.TRANS Customer_Ref.CLIENTS Stock_Key.TRANS Stock_Key.STOCKS Invoice_Sent_yn.TRANS "n"
╡Customer_Ref.TRANS,Transaction ref
q Ödocf$
Æ ╔
Æ í
┤ Ödocf$
vsdorp: ╜ display or print
ía% 0 p ╛ Ödocf$: ├
m312: ╜ Display or print merge documents
¿ oletf$: ╔ `
╪ O B(docf$)
íp$ "p" p ¡ oletf$
íp$ "d" p { o ¡
╧ ¢2
╔ ▒
┘
b% 0
┬ms4$,"",130,a%
ía% p
╜ Update CTRL file and re-set menus grayed=0 active=1
Ö"ctrl"
ímb% 1 p
tran.CTRL 0:cent.CTRL 0:cert.CTRL 0:ceru.CTRL 1
¼1,5,tran.CTRL,"&Transactions"
¼2,3,cent.CTRL,"Certificate &Nos"
¼3,1,cert.CTRL,"&Certificates"
¼4,3,ceru.CTRL,"&Certs Sent"
^ ímb% 2 p
tran.CTRL 0:cont.CTRL 0:conu.CTRL 1
¼1,5,tran.CTRL,"&Transactions"
¼3,2,cont.CTRL,"C&ontract Notes"
¼4,4,conu.CTRL,"&Notes Sent"
Æ í
╠
^
┬ms3$,"",135,b%
íb% 0 p ╛ Ödocf$
Æ í
íb% 1 wm312
├
m4: ╜ ma%=4 Update menu options
│mb% vm41,m42,m43,m44
wmloop
m41: ╜ Update New Highs
┬ms411$,"",140,a%
ía% p
▀ e
╩ ╦ss19$
═Year_High.STOCKS Price Middle.STOCKS:Date of High.STOCKS Price Date.STOCKS
╨Price Middle.STOCKS Year_High.STOCKS 6(Price Date.STOCKS) 6(Date of High.STOCKS)
Æ ═
Æ í
├
m42: ╜ Update New Lows
┬ms421$,"",140,a%
ía% p
▀ e
╩ ╦ss19$
═Year_Low.STOCKS Price Middle.STOCKS:Date of Low.STOCKS Price Date.STOCKS
╨Price Middle.STOCKS Year_Low.STOCKS 6(Price Date.STOCKS) 6(Date of Low.STOCKS)
Æ ═
Æ í
├
m43: ╜ Update Certs Sent
┬ms431$,ms432$,140,a%
ía% p
▀ e
╩ ╦ss19$
═Cert_Sent_YN.TRANS "y"
╨Certificate_No.TRANS "" Cert_Sent_YN.TRANS "n"
Æ ═
╜ Update CTRL file and re-set menus grayed=0 active=1
Ö"ctrl"
tran.CTRL 1:cent.CTRL 1:cert.CTRL 1:ceru.CTRL 0
¼1,5,tran.CTRL,"&Transactions"
¼2,3,cent.CTRL,"Certificate &Nos"
¼3,1,cert.CTRL,"&Certificates"
¼4,3,ceru.CTRL,"&Certs Sent"
╠
Æ í
├
m44: ╜ Update Contract Notes Sent
┬ms431$,ms442$,140,a%
ía% p
▀ e
╩ ╦ss19$
═Invoice_Sent_yn.TRANS "y" ╨Invoice_Sent_yn.TRANS "n"
Æ ═
╜ Update CTRL file and re-set menus grayed=0 active=1
Ö"ctrl"
tran.CTRL 1:cont.CTRL 1:conu.CTRL 0
¼1,5,tran.CTRL,"&Transactions"
¼3,2,cont.CTRL,"C&ontract Notes"
¼4,4,conu.CTRL,"&Notes Sent"
╠
Æ í
├
m5: ╜ ma%=5 Query menu options
▀ │: ▓"z-9999999.00"
╔ µmb%
µ1: ╜ Query Run
vsdorp
ía% p
íp$ "p" p
{ i q h
^
{ i
╩ ╦ss14$
╧ Ñ ▀
Æ í
£
Æ í
µ2: ╜ Query New
╩ ╦ss15$
│ _ wmqerror
░ i
É i
µ3: ╜ Query Open
┬ms23$,"",14,a%,q$
ía% p ¿ iq$
µ4: ╜ Query Edit
╩ ╦ss15$
│ _ wmqerror
É i
µ5: ╜ Query Save
┬ms24$,"",14,a%,q$
ía% p ┼ iq$
Æ ╔
ímb% 2 pmb% 1: wm5: ╜ if New query then Run
mqerror: ╜ Trap for errors generated from Query dialog
│ _ wferror
▓"z-99999.00"
wmloop
m6: ╜ ma%=6 Reports menu options
vsdorp: ía% 0 p wmloop
│mb% wm61,m62,m63,m64,mloop,m66,m67,m68
m61: ä"stkrte"
m62: ä"stkrhe"
m63: ä"stkrle"
m64: ä"stkrre"
m66: ä"stkrne"
m67: ä"stkrbe"
m68: ä"stkrce"
sdorp: ╜ Select d=display p=print
p$ "d"
┬ms17$,"",4,a%,p$,1
í O(p$ "[pd]") wsdorp
ía% p
p$ =(p$)
íp$ "d" p ╩ ╦ss7$ ^ ╩ ╦ss6$: ╣;
Æ í
├
stkf: ╜ File Clients, Stocks, Transactions
╜ Documents Statements
fst% 0:cli% 1:stk% 2:sta% 3:tra% 5:k% 1:t% 0
╜ Set option parameters
╔ µmb%
µcli%: ╜ File Clients
f$ "clients":fkey$ "Customer_Ref":fmd$ "stkc":fmp$ "stkc2"
ívga$ "n" pfmd$ "stkce"
µstk%: ╜ File Stocks
f$ "stocks":fkey$ "Stock_Key":fmd$ "stks":fmp$ "stks2"
µsta%: ╜ File Transactions
f$ "clients":fkey$ "Customer_Ref":fmd$ "stkos":fmp$ "stkos2"
µtra%: ╜ Documents Statements
f$ "trans":fkey$ "Transaction ref":fmd$ "stkt":k% 2
Æ ╔
Öf$
úfkey$
í £ fmd$ p ┤ £fmd$
ind$ ú
vsset
╜ File forms have command only on page 1 to select form on selkey
ímb% sta% p £2
wfwait
floop: ╜ Re-display form
vsset
vssearch
╬
fwait: ╜ Wait here for form pushbutton
ed% 1
╩ ╦ss2$
╧ ▀
wfwait
fedit: ╜ Edit pushbutton
╩ ╦ss4$
ímb% tra% poamt% Total_Due.TRANS
▀ │: ö3,0
fedit2:
▀ e
┬ms1$,"",127,a%
ía% 1 p
╠: ╜ Stores edited data
ímb% tra% pamt% Total_Due.TRANS oamt%: vsupdate
^
╔ £ Y: ╜ Re-dispay form as before edit
Æ í
wfloop
fenter: ╜ Enter pushbutton
ü £:ed% 0
ímb% tra% p
Trans_Type "b":del% 0: ╩ ╦ss18$
^
ímb% cli% pClass.CLIENTS "P"
╩ ╦ss3$
Æ í
▀ │: ö3,0
fenter2:
▀ e
b% 0
┬ms1$,"",127,a%
ía% p
╠: ╜ Store new record
del% 0
ímb% tra% pamt% Total_Due.TRANS: vsupdate
┬ms2$,"",130,b%
^
╔ £ Y: ╜ Re-display current form
Æ í
íb% p wfenter
£2
wfloop
fdelete: ╜ Delete pushbutton
del% 1
ímb% tra% p
╜ Clients, Stocks, test for related transactions, if so set del%=0
╩ ╦ss16$
Ö"trans"
skey$ ckey$
ímb% cli% p úCustomer_Ref.TRANS
ímb% stk% p úStock_Key.TRANS
╔ Ñskey$
í C("") pdel% 0
ckey$ skey$
Öf$
Æ í
ídel% 1 p
┬ms14$,"",119,a%
ía% p
ímb% tra% pamt% Total_Due.TRANS: vsupdate
╔ ╛
Æ í
^
┬ms19$,ms20$,100,a%
Æ í
ídel% 0 wfwait
╔ £ Ñind$$
wfloop
fswitch: ╜ Assign key from transaction and get form/record
mp% 0
╩ ╦ss21$
╧ ▀
í(mp% 0 mp% 10) p wfswitch
╔ £ "mp%
fswitch2: ╜ Entry from Trans form: no need to select line
╔ µmb%
µcli%
selkey$ Customer_Ref.TRANS
µstk%
selkey$ Stock_Key.TRANS
µtra%
selkey% Transaction ref.TRANS
Æ ╔
wstkf
fexit: ╜ Exit pushbutton
wmloop
stexit:
├
supdate: ╜ When transaction changes, update balance in Client record
╩ ╦ss17$
Ö"clients"
úCustomer_Ref.CLIENTS
╔ ÑCustomer_Ref
í C("") p
Trading_Balance.CLIENTS Trading_Balance.CLIENTS amt%
╠
^
┬ms18$,"",100,a%
Æ í
Öf$
├
sindex: ╜ Index pushbutton
┬ms7$,"",7,a%,ind$
ía% p
úind$
vssearch
Æ í
╬
├
spanel: ╜ Browse pushbutton
│ _ wserror
err% 0
ss5$ ss10$ ind$ ss11$
╩ ╦ss5$
spanel2:
╧ Γ
│ _ wferror
╔ ╨
íerr% 1 p é │: Γ e
vsset
├
serror: é e: ╜ Error trap for Wait Panel errors
┬ (( &),"",2,a%
err% 1
╔ £ Y: yspanel2
sprint: ╜ Print pushbutton
b$ "c":c% 0
┬ms16$,"",4,a%,b$,1
ía% 0 p ├
í O(b$ "[csa]") p wsprint
b$ =(b$)
ímb% cli% p ┬ms13$,"",135,c%
ímb% sta% p
ívga$ "n" pfmp$ "stkos2e"
Æ í
╩ ╦ss6$
┤ £fmp$: ╜ Open special print form
íb$ "c" p
vssearch
íc% p £ ╚
╣ Y
┤ £fmd$
vssearch
^
íb$ "s" p ╔ £ ╨ ~
╔ £ `
╪ O B(f$)
íc% p £ ╚
╣ Y
╔ £ ▒
┘
╔ ╨
Å;
┤ £fmd$
╔ `
Æ í
╬
├
sset: ╜ Stores unique value for record in ckey
ík% 1 pckey$ fkey$$
ík% 2 pckey% fkey$$
├
ssearch: ╜ Gets unique record even if index has duplicate keys
╔ £ Ñind$$
ssearch2: ╜ Loop until correct record found
ík% 1 p ífkey$$ ckey$ p ├
ík% 2 p ífkey$$ ckey% p ├
╔ £ ▒
wssearch2
ferror: ╜ General error trap
res% 0
í & 11 p
┬ms21$,ms22$,130,a%: ía% 1 pres% 1
^ í & 57 p
┬ms8$,"",2,a%:res% 2
^
┬ (( &),ms9$,114,a%: ía% 1 pres% 3
Æ í
íres% 1 p y
íres% 2 p yfloop
íres% 3 p ymloop
É